<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<!--导航栏 fixed-->
<div id="top" class="fixed" data-th-fragment="top">
    <!-- .navbar -->
    <nav class="navbar navbar-static-top">
        <div class="container-fluid m-0">
            <a class="navbar-brand float-left" th:href="@{/backend/}">
                <h4><img th:src="@{/img/logo.png}" class="admin_img" alt="logo"/>&nbsp;后台管理系统</h4>
            </a>
            <!-- center--> <!--hidden-lg-up-->
            <div class="menu  float-left">
                    <span class="toggle-left" id="menu-toggle">
                        <i class="fa fa-bars"></i>
                    </span>
            </div>
            <!-- #center-->

            <div class="topnav dropdown-menu-right float-right">
                <div sec:authorize="isAuthenticated()">
                    <div class="btn-group">
                        <div class="user-settings no-bg">
                            <button type="button" class="btn btn-default no-bg micheal_btn" data-toggle="dropdown">
                                <img th:src="${#authentication.principal.avatar} == null ? '/img/default_avatar.jpg' :
                                 ${#authentication.principal.avatar}" class="admin_img2  rounded-circle "
                                     alt="avatar"/>
                                <strong>[[${#authentication.principal.name}]]</strong>
                                <span class="fa fa-sort-down white_bg"></span>
                            </button>
                            <div class="dropdown-menu drop_box_align">
                                <a class="dropdown-item title" href="#">
                                    [[${#authentication.principal.name}]]</a>
                                <a class="dropdown-item" th:href="@{/user/profilePage}"><i class="fa fa-cog"></i>
                                    信息编辑</a>
                                <a class="dropdown-item" th:href="@{/user/logout}"><i class="fa fa-sign-out"></i>
                                    退出</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- /.container-fluid -->
    </nav>
    <!-- /.navbar -->
    <!-- /.head -->
</div>
</html>